﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace UPNP.IO.ValueConverters
{
    // for more details see:
    // http://www.knopflerfish.org/releases/current/docs/jars/upnp/upnp_api-2.0.0/src/org/osgi/service/upnp/UPnPStateVariable.java
    public interface IDeviceValueConverter
    {
        Type ManagedType
        {
            get;
        }

        /// <summary>
        /// converts the device response's
        /// xml string representation to an
        /// native .NET value
        /// </summary>
        object FromDevice(string value);

        /// <summary>
        /// converts a .NET value to its
        /// device xml string representation
        /// </summary>
        string ToDevice(object value);
    }
}
